<template>
  <div class="box">
    <button @click="count--"> - </button>
    <span> {{ count }}</span>
    <button @click="count++" > + </button>

    <!-- <br>

    <button @click="count--"> - </button>
    <span> {{ count }}</span>
    <button @click="count++" > + </button>

    <br>
    <button @click="count--"> - </button>
    <span> {{ count }}</span>
    <button @click="count++" > + </button> -->
  </div>
</template>

<script>

export default {
  // data:{}  ---->  共用一个 {} , 共享count
  // {num}  {num}  {num}
  data(){
    return {
      count:99
    }
  }
}
</script>

<style >
.btn {
  background-color: green;
}
</style>